<?php
/**
 * Created by PhpStorm.
 * User: 64423
 * Date: 2018/10/16
 * Time: 15:48
 */

namespace app\shop\validate;


use think\Validate;

class Article extends Validate
{
    protected $rule = [
        'sort' => 'require|number',
        'title' => 'require',
        'author' => 'require',
        'desc' => 'require',
        'cate_id' => 'require',
        'content' => 'require',
        'original_img' => 'require'
    ];

    protected $message = [
        'sort.require' => '请输入排序',
        'sort.number' => '排序必须为数字',
        'title.require' => '请输入文章标题',
        'author.require' => '请输入文章作者',
        'desc.require' => '请输入文章简介',
        'cate_id.require' => '请选择文章分类',
        'content.require' => '请输入文章内容',
        'original_img.require' => '请上传封面图'
    ];
}